package com.turnengine.client.local.group;

import java.util.Collection;
import java.util.List;

import com.turnengine.client.local.faction.bean.IFaction;
import com.turnengine.client.local.group.bean.IGroup;

public interface IGroupCache extends Iterable<IGroup> {

	int size();

	void clear();

	boolean addGroup(IGroup group);

	int addGroups(Collection<IGroup> groups);

	boolean containsById(int id);

	boolean containsByName(String name);

	IGroup getById(int id);

	IGroup getByName(String name);

	List<IGroup> getByFactionId(int factionId);

	List<IGroup> getByParentId(int groupId);

	List<IGroup> getByFaction(IFaction faction);

	List<IGroup> getByParent(IGroup group);

	List<IGroup> getAll();

}
